<%@page import="comment.CommentVo"%>
<%@page import="comment.CommentMyBa"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>댓글등록</title>
<script>
function goPage(no){
	/* alert(no); */
	location.href = "index.jsp?inc_content=./board/board_view.jsp&bo_no=" + no ;
}
function goList(no){
	location.href = "index.jsp?inc_content=./board/board_view.jsp&bo_no=" + no ;
}

</script>
</head>
<body>
<jsp:useBean id="commentVo" class="comment.CommentVo"></jsp:useBean>
<jsp:setProperty property="*" name="commentVo"/>
<%
CommentMyBa comment = new CommentMyBa();
comment.setCommentVo(commentVo);
int cnt = comment.insert();
/* out.print(commentVo.getCO_no()); */

%>
<%
if(cnt>0) {
	/* out.print(commentVo.getBO_no()); */
%>
<script>goPage("<%=commentVo.getBO_no()%>")</script>
<%}else{ %>
댓글등록실패.<input type="button" value="목록" onclick="goList('<%=commentVo.getBO_no()%>')">
<%} %>

</body>
</html>


